package com.meida.module.vip.provider.service.impl;

import com.meida.common.mybatis.base.service.impl.BaseServiceImpl;
import com.meida.common.mybatis.entity.EntityMap;
import com.meida.common.mybatis.model.ListModel;
import com.meida.common.mybatis.model.ResultBody;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.module.vip.client.entity.VipType;
import com.meida.module.vip.provider.mapper.VipTypeMapper;
import com.meida.module.vip.provider.service.VipTypeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * vip表 实现类
 *
 * @author flyme
 * @date 2019-06-24
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class VipTypeServiceImpl extends BaseServiceImpl<VipTypeMapper, VipType> implements VipTypeService {


    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
    public ResultBody listEntityMap(ListModel model) {
        CriteriaQuery<EntityMap> cq = new CriteriaQuery(model, VipType.class);
        cq.select("type.vipTypeId", "type.vipName", "type.prePrice", "type.oriPrice", "type.vipLogo");
        return baseList(cq);
    }


}
